package edu.umd.ion.wavemeter.service;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Datastructure to define the settings of the Interlock of one channel
 * @author pmaunz
 *
 */
public class InterlockSettings implements IsSerializable {
	/**
	 * Channel index
	 */
	public int Channel;
	/**
	 * Minimum Threshold Wavelength in nm
	 */
	public double MinWavelength;
	/**
	 * Maximum Threshold wavelength in nm
	 */
	public double MaxWavelength;
	/**
	 * Interlock enabled
	 */
	public boolean Enable;
	/**
	 * A serial to allow to inform clients if the settings were changed from a different client
	 */
	public int Serial;
	
	public InterlockSettings() {}
	
	/** Constructor
	 * @param channel index
	 * @param min lower threshold wavelength in nm
	 * @param max upper threshold wavelength in nm
	 */
	public InterlockSettings(int channel, double min, double max) {
		Channel = channel;
		MinWavelength = min;
		MaxWavelength = max;
		Enable = false;
	}
}
